{template header}
<div class="maininfo">
	<div class="lattice x1" style="padding-left: 0;">
		{template userlogin}
	</div>
	<div class="lattice x4" style="padding-right: 0;">
		<div class="giftlist">
			<div class="boxcla1">
				<div class="hd">
					<div class="r">
						<div class="m"></div>
					</div>
				</div>
				<div class="bd" style="padding: 0 10px; overflow:hidden;">
					<h3 class="title_cla4">基本资料</h3>
				</div>
				<div class="ft">
					<div class="r">
						<div class="m"></div>
					</div>
				</div>
			</div>
			
			<div class="main">
			<form action="user-detail.htm" method="post" onsubmit="return verifyFrom();">
			<table width="100%" border="0" cellspacing="2" cellpadding="2" style="text-align:center">
				<tr>
					<td width="20%" height="30" align="right">真实姓名：</td>
					<td width="80%" align="left"><input type="text" name="user[realName]" value="$user[realName]"/></td>
				</tr>  
				<tr>
					<td height="30" align="right">手机号码：</td>
					<td align="left"><input type="text" name="user[mobile]" value="$user[mobile]" /></td>
				</tr> 
				<tr>
					<td height="30" align="right">联系电话：</td>
					<td align="left"><input type="text" name="user[phone]" value="$user[phone]" /></td>
				</tr>
				<tr>
					<td height="30" align="right">邮箱：</td>
					<td align="left"><input type="text" name="user[email]" id="email" value="$user[email]" /><span id="err_email"></span></td>
				</tr> 
				<tr>
					<td height="30" align="right">公司名称：</td>
					<td align="left"><input type="text" name="user[company]" id="company" value="$user[company]" /><span id="err_company"></span></td>
				</tr>
				<tr>
					<td height="30" align="right">地区：</td>
					<td align="left"><select name="province" id="province" style="width: 150px;" onchange="ajaxget('user-ajaxCity-'+this.value+'.htm', 'showCity', 'showCity', null, null)">
					<option value="">请选择区域</option>
					<!--{loop $areaList $v}-->
					<option value="{$v[id]}" {if $area[fId]==$v[id]}selected="selected"{/if}>{$v[name]}</option>
					<!--{/loop}-->
					</select>
					<span id="showCity">
					<select name="user[areaId]" id="city" style="width: 150px;">
					<option value="">请选择区域</option>
					<!--{loop $subAreaList $v}-->
					<option value="{$v[id]}" {if $user[areaId]==$v[id]}selected="selected"{/if}>{$v[name]}</option>
					<!--{/loop}-->
					</select>
					</span>
					<span style="color:red" id="err_city"></span></td>
				</tr>
				<tr>
					<td height="30" align="right">地址：</td>
					<td align="left"><input type="text" name="user[address]" value="$user[address]" style="width:300px" />(请填写详细，为收货地址)</td>
				</tr>
				<tr>
					<td height="30" align="right">邮编：</td>
					<td align="left"><input type="text" name="user[postCode]" value="$user[postCode]" /></td>
				</tr>
				<tr>
					<td height="30" align="right">&nbsp;</td>
					<td align="left">
					<input type="submit" class="inputsubmit" name="submitTo" value="  提交  " />
					</td>
				</tr>
			</table>
			</form>
			</div>
		</div>
	</div>
</div>
<script>
function verifyFrom() {
	var company = $('company');
	if(company.value == '') {
		$('company').focus();
		$('err_company').innerHTML = '<span style="color:red">&nbsp;&nbsp;&nbsp;&nbsp;请填写公司名称</span>';
		return false;
	}
	var email = $('email');
	if(email.value == '') {
		$('email').focus();
		$('err_email').innerHTML = '<span style="color:red">&nbsp;&nbsp;&nbsp;&nbsp;请输入邮箱</span>';
		return false;
	}
	return true;
}
</script>
{template footer}